package com.gaojinqi.sys.common.constant;

import com.google.common.collect.Lists;

import java.util.List;

/**
 * shiro 默认配置
 *
 * @author gaojinqi
 * @version 1.0
 * @since 2020年05月06日
 */
public class ShiroDefaultConst {

    /**
     * 登录令牌key
     */
    public static final String LOGIN_KEY = "JWT-Token:";

    /**
     * 登录的 url
     */
    public static String LOGIN_URL = "/login";

    /**
     * 登录成功后跳转的 url
     */
    public static String LOGIN_SUCCESS_URL = "/index";

    /**
     * 未授权 url
     */
    public static String UNAUTHORIZED_URL = "/unauthorized";

    /**
     * 免认证 url
     */
    public static List<String> ANON_URL = Lists.newArrayList("/test/**", "/img/**", "/layui/**", "/json/**", "/images/captcha", "/regist", "/actuator/**");

    /**
     * 退出登录url
     */
    public static String LOGOUT_URL = "/logout";

    /**
     * session 超时时间，单位为秒
     */
    public static Long SESSION_TIMEOUT = 3600L;

    /**
     * rememberMe cookie有效时长，单位为秒
     */
    public static Integer COOKIE_TIMEOUT = 86400;

}
